home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
36
/
dvmon13.zip
/
DVMON.DOC
< prev
next >
Wrap
Text File
|
1988-05-16
|
8KB
|
175 lines
DVMON Version 1.1 - A CPU PERFORMANCE MONITOR FOR DESQVIEW
Written By: Barry A. Burke May, 1988
Copyright 1988 Barry A. Burke. All rights, except those
specifically granted herein are reserved by the author. The right
to copy and distribute this material is granted without fee for
any and all non-commercial use. This material specifically may
not be distributed or sold for a fee nor incorporated in whole or
in part into any other product that is distributed or sold for a
fee without specific permission of the author. To obtain special
permission or to report any difficulties with this material
contact:
Barry A. Burke
Marketing Insights
35 Elizabeth Circle
Framingham, MA 01701
THIS MATERIAL IS DISTRIBUTED "as is" WITHOUT ANY EXPRESSED OR
IMPLIED WARRANTY OR LIABILITY FOR DIRECT, INDIRECT OR
CONSEQUENTIAL DAMAGES.
OVERVIEW
DVMON is a simple CPU performance monitor for use with DESQview 2.01
and later. DVMON calculates the amount of CPU that is UNUSED by all
running applications and displays this percentage along with the
current date/time once a second. DVMON can be used to isolate programs
that are not DESQview-aware so that you can either a) correct them by
adding DVPAUSE calls (where applicable) or b) reduce timeslices so as to
minimize impact on other applications.
REVISION HISTORY
Revision 1.0 (actually, it had no Rev Number) - original version sent
to the Quarterdeck BBoard on May 13, 1988.
Revision 1.1 - May 16, 1988. Fixed bug with bell ringing. Decided not
to run in DvCritical mode, and a side effect is that I can't make the
bell screw up anymore. Minor code changes to reflect removal of
Critical code. Added a makefile.
PROGRAM INFORMATION
DVMON requires only 9K of memory to run. TurboC source and a PIF file
are included in this ARC file.
DVMON is written in C for Turbo C Version 1.5, but also requires MASM
since some in-line assembly is used to minimize memory requirements.
If it is recompiled you should use the small model for minimum size. I
used the following command line options:
tcc -O -Z -G -M -B -f- dvmon.c
DVMON uses a very simplistic approach in determining the amount of
UNUSED CPU in your system. When it starts up, it runs a tight loop to
count the number of times it can get serviced in 18 ticks. Thereafter,
it counts the number of times it gets the CPU for each 18 ticks,
calculates a percentage over the original count, and displays the
current date/time and percentage in the first two lines of a window.
For best results, DVMON should be started with no other open windows
so that it's calibration loop is most accurate. On my 386 system, I
start DVMON in the DESQview !Startup script as the SECOND program (A
large DOS window is first so that it gets the maximum available
memory). On my 286 with LIM 4.0, I start DVMON (from !Startup) as the
FIRST program, so that it gets it's memory allocated so that it can
run no matter what else is running (CAN BE SWAPPED = N -- see
installation notes below).
In both it's calibration loop and it's monitor loop, DVMON DV_PAUSE's
after every increment. This assures the most accurate numbers possible
without reducing the total amount of CPU available by (background
timeslice time). If a program wants/needs all available CPU, DVMON
will in fact report "0% CPU Unused". On a 16MHz 386, DVMON imposes
about a 3% CPU overhead (it never reports more than 97% Unused) --
this number is supported by the difference in the Norton 4 SI numbers
for this system under DOS and under DESQview. On a 10MHz 286, the
overhead is 4-5%.
DVMON uses only DOS and BIOS calls for it's I/O operations.
You can change the monitor/update frequency at the #define INCRSECS
line. If you want a full Turbo C DV library, remove the lines
surrounded by #ifdef NOTDEF.
KNOWN PROBLEMS
If you do start DVMON from your !Startup, take care not to type
anything until after DVMON is done calibrating. Otherwise you might
start seeing the %CPU Unused exceed 100% because of the effect of your
keystrokes on the calibration loop.
By definition, any performance monitor running on the same CPU will
reduce performance somewhat. I have made every effort to minimize this
effect, but it's not perfect. I figure a 3 or 4% reduction is worth it
to be able to uncover those nasty CPU hogs that simply poll for
keyboard input.
I originally wrote DVMON to see what difference fixing JOVE 4.9 to be
DESQview aware would make. On my 386 (w 5Meg of QEMM 4.1 LIM memory,
no less!), running original Jove, DVMON reported 0% CPU Unused. This
is because Jove was in a keyboard poll/mode line update loop when
idle. I added a DV_PAUSE to the idle loop, and DVMON reported 5% CPU
unused! WOW, I thought, not much gain. but in fact since both DVMON
and JOVE now give the CPU when not needed, OTHER applications can in
fact get nearly 100% of the CPU (less the 3% overhead for DVMON and
the small overhead for JOVE's idle loop). The sad news is that DVMON
can't detect that the other applications are DESQview aware, and that
the current %unused isn't really the amount of CPU available to other
applications. (This is why I call it % UNUSED instead of % AVAIL-
ABLE!). Anyway, it's neat to watch the number change, anyway.
INSTALLATION
Install as with any other Desqview application program. A PIF
file, for DV 2.0, is included to make it easy. A copy is attached.
The screen size is the minimum required to run DVMON, and shouldn't be
reduced (you can increase it, but you probably don't want to). The PIF
file tries to put this monitor at the lower right-hand corner of the
EGA monitor in 43-line mode. You may wish to change this.
COPY OF CHANGE A PROGRAM SCREENS
Change a Program
Program Name............: Performance Monitor
Keys to Use on Open Menu: PM Memory Size (in K): 9
Program...: c:\dv\dvmon.exe
Parameters:
Directory.:
Options:
Writes directly to screen......: [N]
Displays graphics information..: [N]
Can be swapped out of memory...: [N]
Requires floppy diskette.......: [N]
Change a Program Advanced Options
System Memory (in K).......: 0 Maximum Program Memory Size (in K)..:
Script Buffer Size.......: 0 Maximum Expanded Memory Size (in K):
Text Pages: 1 Graphics Pages: 0 Initial Mode: Interrupts: 00 to FF
Window Position:
Maximum Height: 2 Starting Height: 2 Starting Row...: 41
Maximum Width.: 25 Starting Width.: 24 Starting Column: 55
Shared Program
Pathname..:
Data......:
Options:
Close on exit to DOS.........: [Y] Uses its own colors.........: [N]
Allow Close Window command...: [Y] Runs only in foreground.....: [N]
Uses math coprocessor........: [N] Keyboard conflict (0-4).....: [4]